﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;

namespace Simple.Services;

public class QHSEXyViolationTypeModel : ModelBase
{
    /// <summary>
    /// ID
    /// </summary>
    [MaxLength(32)]
    [Key]
    public string ViolationTypeId { get; set; } = "";

    /// <summary>
    /// 违章性质编码
    /// </summary>
    [MaxLength(32)]
    public string? ViolationTypeCode { get; set; }

    /// <summary>
    /// 违章性质描述
    /// </summary>
    [MaxLength(100)]
    public string? ViolationType { get; set; }

    /// <summary>
    /// 扣分
    /// </summary>
    public float? Score { get; set; }

    /// <summary>
    /// 罚款
    /// </summary>
    public float? Fine { get; set; }

    /// <summary>
    /// 排序号
    /// </summary>
    public int? OrderNo { get; set; }

    public override void ConfigureMapper(Profile profile)
    {
        profile.CreateMap<QHSESysXyViolationType, QHSEXyViolationTypeModel>()
            .ForMember(d => d.ViolationTypeId, options => options.MapFrom(s => s.ViolationTypeId));
        profile.CreateMap<QHSEXyViolationTypeModel, QHSESysXyViolationType>()
            .ForMember(d => d.ViolationTypeId, options => options.MapFrom(s => s.ViolationTypeId));
    }
}
